@use "sass:map";

$sidebar-gradient: linear-gradient(50deg, $gray-300, transparent);

.sidebar {
  position: sticky;
  top: 10px;
  border-radius: 10px;
  height: max-content;
  flex: 0 0 250px;
  max-height: 100vh;
  overflow-y: auto;
  z-index: 109;
  right: 0;
  background: $nav-background-color;

  > * {
    background: $sidebar-gradient;
    padding: 12px 20px;
  }

  @media screen and (max-width: map.get($grid-breakpoints, "lg")) {
    position: fixed;
    top: 0;
    right: -80%;
    height: 100%;
    width: 80%;
    max-width: 400px;
    background-color: $white;
    overflow-y: auto;
    box-shadow: -2px 0px 5px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    &.open {
      right: 0;
      z-index: 112;
    }
  }

  .sidebar-header {
    background: $blue;
    color: white;
    padding-top: 20px;

    p:first-of-type {
      font-size: 25px;
      font-weight: 900;
    }

    p {
      margin-bottom: 5px;
    }
  }

  .sidenav-content-grid {
    display: grid;
    gap: 10px;
    padding-bottom: 12px;
  }

  .release-tags {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
  }

  .tags {
    display: inline-block;
    margin: 2px 2px 5px;
    padding: 3px;
  }

  .release-tag-name {
    margin-right: 5px;
    font-weight: 500;
    font-size: 13px;
  }
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 1;
  border: none;
}

.toggle-sidebar-button {
  position: fixed;
  bottom: 20px + $brainzplayer-height;
  right: 20px;
  z-index: 9999;
  width: 64px;
  height: 64px;
  padding: 10px;
  border-radius: 50%;
  border-color: $black;
  cursor: pointer;
  background-color: $white;
  color: $blue;

  @media screen and (min-width: map.get($grid-breakpoints, "lg")) {
    display: none;
  }
}

.toggle-sidebar-button.open {
  background-color: $blue;
  color: $white;
}
